/**
 * 分页查询新闻列表
 *
 * @param data
 * @returns {*}
 */
function pageList(data) {
    return requests({
        url: '/admin/news/pageList',
        method: 'post',
        data: data
    })
}

/**
 * 查询新闻详细
 * @param id
 * @returns {*}
 */
function detail(id) {
    return requests({
        url: '/admin/news/query/' + id,
        method: 'get'
    })
}

/**
 * 新增新闻
 *
 * @param data
 * @returns {*}
 */
function add(data) {
    return requests({
        url: '/admin/news/add',
        method: 'post',
        data: data
    })
}

/**
 * 修改新闻
 *
 * @param data
 * @returns {*}
 */
function update(data) {
    return requests({
        url: '/admin/news/update',
        method: 'post',
        data: data
    })
}

/**
 *  删除新闻
 * @param id
 * @returns {*}
 */
function del(id) {
    return requests({
        url: '/admin/news/delete/' + id,
        method: 'delete'
    })
}

/**
 * 导出新闻
 *
 * @param query
 * @returns {*}
 */
function exportData(data) {
    return requests({
        url: '/admin/news/export',
        method: 'post',
        data: data
    })
}
function updateProductStatus(data) {
    return requests({
        url: '/admin/news/update',
        method: 'post',
        data: data
    })
}

function pageList2(data) {
    return requests({
        url: '/admin/newsCategory/list',
        method: 'post',
        data: data
    })
}